<?php require VIEW_PATH.'/header.php';?>
<body>
<div class="hd-menu-list">
    <ul>
        <li class="active">
        	<a href="{{U('index')}}">备份列表</a>
        </li>
        <li><a href="{{U('backup')}}">备份数据</a></li>
    </ul>
</div>
<table class="hd-table hd-table-list">
    <thead>
    <tr>
        <td class="hd-w150">目录名称</td>
        <td>备份时间</td>
        <td class="hd-w100">操作</td>
    </tr>
    </thead>
    <tbody>
    <?php foreach($data as $field):?>
    <tr>
        <td>{{$field['basename']}}</td>
        <td>
            {{date('Y/m/d H:i:s',$field['filemtime'])}}
        </td>
        <td class="hd-w150">
            <a href="{{U('recovery',array('dir'=>$field['basename']))}}">还原</a> |
            <a href="javascript:del({{$field['basename']}})">删除</a> 
        </td>
    </tr>
<?php endforeach;?>
    </tbody>
</table>
<script>
    function del(dir)
    {
        if(confirm('确定删除吗？'))
        {
            location.href='{{U("del")}}&dir='+dir;
        }
    }
</script>
</body>
</html>